package com.ruoyi.basic.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.basic.domain.TbCategoryReal;
import org.apache.ibatis.annotations.Param;

import java.util.List;


/**
 * @author zyxis
 */
public interface TbCategoryRealMapper extends BaseMapper<TbCategoryReal>
{
    /**
     * 根据ID查询所有子分类（正常状态）
     * @param categoryId
     * @return
     */
    int selectNormalChildrenCategoryById(Long categoryId);

    /**
     * 根据ID查询所有子分类
     * @param categoryId
     * @return
     */
    List<TbCategoryReal> selectChildrenCategoryById(Long categoryId);

    int updateCategoryChildren(@Param("categorys") List<TbCategoryReal> categorys);
}
